Fixing checkPriorities