Fixing some JS errors from the refactoring