more fixes for #2639