fixed errors detected by pyflakes