heapq_mod fix