Fixed bug causing includes/form.inc to present a PHP error on foreach.
Added default domain override for empty domain in settings.