fix scandata creation bug