Fixed redirect to wrong page bug