Fixed problems found by Pyflakes