fix #8 #9 #10