Fix #12
fix #9
fix #13