Fix 1-safe optimization