fix devices when it's an array