fixed if then fi bug in acurl