New attempt at fixing bug 3186