Fixed incorrect creating of Device, if it was not found.