Fixed a bug in theme engine.