Fixed up rendering bugs