Fixed #5195: Fix issues for android platform