Fixed issue where creating a device would always add a new platform, regardless of whether it exists already or not.