Fix seg fault intoduced by the last patch.

Looks like I was a bit too hasty modifying the patch sent in by
Jonathan Herbst (sorry Jonathan).