Fix up realms handler