Fix detection whether the resource is updated or not.