Update: Better checks if redirect is needed