bug fix for mappings and index creation