[IOT-2334][IOT-2335] Fixed presence sample app crash issue