oops, unlock mutex on all exit paths