Fix theme generator problem with variable reset