Fix for #1059