misc changes for appengine python 2.7