repair refs, hack php renderer