Fixing JS issue