fixed @resource.save