porting over theme fixes from master