unlock mutex even in case of panic