fixes Python 3.0 compatibility