Fix errors found by pylint