Fixed issue #10 and issue #12.