Fix for #1096