undo some bugs