Fix some rendering bugs of previous work.