Fixed to be compatible with python 2.6, removed a debug statement that was no longer needed