bug fix for server redirect