fix of resetting context