Fix problems with TextOutput when switching themes