Merged changes to device selection