try and fix redirect loop