fixes bad bash code