fix bug
close #38 #39 #40