Fixed Python 3.2 syntax issues.