Some python 3 compatibility