fix resource::has method