fix issues #18 & #19