support for bidirectional themes traverse