fix error during replace for pep8 compliance