Fixing issue with redirect