IOT-945: Fixing segmentation fault issue