Fixed bug with domain check