Fix issues raised by pyflakes