fix pyflakes warnings