Fix issue about passing the correct table before executing the algorithm