fixed the glitch when changing agenda view