fixed mistake introduced while porting to python3