Fix errors when editing host

http://projects.theforeman.org/issues/2316