Fixed compatibility issue with old bash versions