fix config bug, more unit test