Made Python2 compatible.