corrections to be compliant with python 2.6 archeolitic syntax