fix bugs in the sh files.