Better fix for #2928