fixed #26 #34 #35 #39 #40 #45