Improve test coverage

fix #96 
fix #97