fixes #675

Haha, yeah I'd actually forgotten about it until I was changing this function anyway!