Fix priority null bug