Fix some lines of code to work with Python 2.x

This program is now Python 2.x compatible