Fixed syntax so this can run on Python 2.4