fixing javascript stuff