Fixed a couple of crashers.

Thank you, unit tests!