fix end.sh.