Fixed errors found when run through pyflakes
Fixed errors found when run through pyflakes