Fixed compat issues with py2.6 and 3.3