fix crash with data detector