Fixed bugs in digest2Fends and mapaFends