Fix the bug with binaryheap at server startup