Fix for #1407