fixes missing index error when mapping for the first time