fixed bug in renderer