Sign up drop down selection not staying selected after signup error (fix)

When a user signs up and has domain selected then has a error with his signup the domain in the drop down reverts to the original default.

multi-domains.php
Line 746 "Ish"

Changed
echo '<option value="' . $domain['domain_name'] . '">' . $domain['domain_name'] . '</option>';

To:

if($_POST['domain']==$domain['domain_name']){
echo '<option value="' . $domain['domain_name'] . '" selected>' . $domain['domain_name'] . '</option>';
} else {

echo '<option value="' . $domain['domain_name'] . '">' . $domain['domain_name'] . '</option>';
}