Fix some error caught by pylint