Fixed some rendering bugs.