fix crash on older api