JavaScrip was in the wrong place