fix an erro when checking a resource different than the current controller