Fixed issues detected by pyflakes.