Fix bugs in glite script.