fixed di for $resource in category factory