fix bugs, remove data after commit