fixed server error flow