Fix for #1010