fix bad bash code