Fix for #670