Fix activeEntries function.