Fixing more warnings and really fixing the JS bug this time