Fixing rendering occurring in the wrong order.