server error handling fixed