added two small changes to enable Python 2.6