fix #16
fix #13
fix #12