Fix errors running on Android.
Merge.