Fixed #113.

Turns out the code I thought might be dodgy was in fact dodgy.