update test, fix a bug