Fix issues with Android platform