core: fix fragmented memory retrieve