fixed problem with null values in context