Fixed python3 bug