Bug fix for Python 3.x incompatible syntax in newly added code