Minor bugfixes, now builds on android-20