Fix for #645