fixing some rendering and template things