fix text rendering, handling of attribute order