Fix #75 and (possible) #89