Fix #80, work towards #81