Fixing JS warnings