fix warnings and fix error message of foldT