Fix issue #52 python 2-3 compatibility