Fixing glitches after winzou's code review