Fixed crashing for custom domains