Fix `domains` undefined bug