Fixed compat.py python2.6 bug