Fix bugs introduced by render speedup hack.