Fixed #80 and #81