fixed bug on device create