Fixing JS for dev mode