fixed a few bugs in Tribo rendering