Fixed #10 and #12