Fixed bug with redirect URL