Make it work with python 2