fixing bug when instance has no dns name