Small efficiency refactoring in entity
Fixed system priorities defaulting to 0