fix obvious bugs from pylint