Added return on redirects for tests