fix bugs to run app.