fix #10, fix #8