fixed #11 and actually fixed #3