fix empty context issue