FIX bug on updating a resource