fix #68 #82 #79 #54 #50