Bugfixing

Fixed #7 and fixed #8