Merged back fix for #91 to 1.1 branch