fixed python3 bug