Fixed socket read. Issue #7