Added a max_trys argument to alignments stage