Fix case where one context item is undefined