fixed issue with creating/updating residences