fix some unitest bugs!