Improved handling on server response.