call resource_callback with correct type