Fixed #3 and fixed #13