Fixed obvious py3 syntax issues