fix for #642