fix #19, fix #20