fixed #7 & #8