unclean fix for updating entrycount; TODO