changed handling of null values