fixed some bug in the renderingsystem