fix some pyflakes warnings