Fix #160 #161 #162 #163