Attempt at fixing bug 3186