Fix for #1078