Make module work with python3