Fix #128

Fix for #128, see commit statements for details.