fixed #163 #161 #160