fixed error redirect