fixed some bugs with themes