fixed a bug where long doesnt exist in python3