Fixed py3k support