fixing resource model/controller.