Fix crash when opening tools on some devices