Fixed get_domain method