Fixed pyflakes warnings