Fixed #2 and fixed #3