fixed crash in renderer