fix #10
fix #9
fix #2