Fixed bugs found by PyFlakes.