Minor bug fix in alignmnet scipts