fixed context handling