Make sure to call UnLock even in early returns