fix #13, #14, #15
fix #8