Fixed Issue #10, #19, #20