To be tested, should fixed issue #21 and #19