port to android fix some bug