Safe and nice optim