Avoid using bytes after reading from outside