Fix for setting CI to device when device is created via API.

(as proposed by @mkurek)