Bug fixes for deployment to GAE