more fixes for python3

whoops, didn't test them, my bad.

Tested with Python 2.7.4 and 3.3.1 this time :)