fix crashes on Android 2.3