Fix mode issue with recurse statement