Fixes for production javascript