Fixes some rendering problems.