Fix domain new with local variable