added and fixed minor and major issues when azure vms are terminated