Fixed #74 and #78