changed initial redirect only work on initial page load