fixing JS issue