fixbug and test