Better fix for the bug described in 660f64c.