clear globals before loading new page