fix #6, #8