Unmap before resizing