Fix #88 and #89