Fix some bugs in ccui;