Fix writing reply to a client.

Issue:	#94
Reported by:	@jpastuszek