Use bash to fix #384