bugs in remaining-files and pred