Fix #128

See commit statements for details.