More fixes.

This wasn't supposed to be a separate pull request. I made two commits, pushed them into my fork, then requested for pull -- yet, only one of them got in. Stupid.