Fixed issue with terminating last instance from Azure.