Making code compatible to Python 2.6.