Annother patch from Larry Hoff - replace 0 with NULL