fix the bug with reading random characters from remote server