part of fix from android-plugin/#189