Fix WS error writing #5