Adjust project and fix bugs.