fix #9
fix #12
fix #5