fixed the library for python 2