Fix for #1237