correct some bugs, it can work normally

codes commited last time can't work well,  writeback index isn't right.