some fixes for GAE version.