fix redirect stuff