Improve support for custom themes