Fix datamap creation