Partial records

Applied a fix to compensate for receiving partial records or chunks that
end in the middle of a record