fix socket writer to send looong exceptions

Fix some stupid bug. Sorry about that.