Fixed a crash after changing orientation in Android 2.3.3.