Fixed issue #20 and #21.