fix #16, fix #17