Fixed Redirect loop error