fix bug and problem for ui