fixed url bug and nullable relation type