fixed #19 and fixed #20