Add realm server and some fix