fix #41 #38 #33 #31 #22 #20 #19 #17 #2