Fixed issue with algorithm. I need to test now the algorithm on the development version. This refs #6577