fix issue #8 & #9