first
fix some server redirect bugs