Fixed some warnings from pyflakes