Fixed another error with the foldr anonymous function.