What part of the Javascript is creating this to happen?