Attempt to fix some javascript for production