Fix exception being thrown in an error log

Oh the ironing ;)