Fix for #1321