Fix for #1298