Added bug fix if data not present in map - didn't check why it might be
missing.