Some python3 fixes