fix #19, fix #17