fixed bugs in new rendering system