fixed bug for max windo agenda