fix the case when context is an array