Fix weird bash code issue which made bash complain about "then"