Fix for writing response.