fix issue #18, #19