fixing issues when running under python 2.6