Fix Bug: Unlock a not held mutex when spawn fails.