fixed error on resource api