Fixed some android related bugs.