Fix some bugs'