Additional fixes for #3396