"fixed" for 4.0.20

For whatever reason, the old method doesn't work as well as it used to,
so here's a slight hack