Fix issues pointed out by pylint