Changes to support python 3.3 better