Clean some bugs