Do not copy more data than needed