Fixed #6 and fixed #7