Fixed #83 and fixed #82