fix copy paste errror: add check for stored distance matrix again