fix some bug and adaptive UI