quick fixes for server to work on python 2.6