Fix disposing latches.