cleanup context after finalizing