[Fix some bugs]