Fixed #1 and fixed #2