fixing javascript reference