Fix #66 and #65