Fix segfault on wrong domain