fix #6, fix #7