Fixed bug when checking domain