fixed the bugs in the app