fixes #2663 javascript errors on the host form