Fixes to broken shell scripts