Fix minor python 3 compatibility issue