Added better multi-device support