fix bugs in files