Fixed minor error in device creation