renamed onUnrender