fix #6
fix #7
fix #8
fix #9
fix #10
fix #11
fix #12