bugfix: ensure moving the right amount of data

and not some random memory (which wouldn't have been used anyway, but still...)