before modify theme index