Avoid early return without releasing lock