Fixing hadd generation scripts