Fix priority lines, now works with 8 devices.