fixed bubbleUp() by comparing just priority not the whole element.