fixed redirect loop in master