fix pep8 and invalid syntax