Fix crash on API 31+
