Added support for primary device.