Fix exception being thrown.