Fixed issue with redirecting