close #19 close #9 fix #18