Tested and fixed a bug with the method of writing web response.