Fixed some bugs for cluster slurm submission