fixes some rendering issues