fix bugs and update files