Updated queries to remove nulls