Fixed typo on line 1140, and removed extra pylint error with unused variable