fix #20 #21 #22