bugfix: refactoring rendering system introduced bugs.