fix some bash errors