Fix bugs for Android, iOS