fix error in test and add more tests