Fix for #1033