fixed bug with no right to left output and with blocking after closing socket