Finally fixed the bug in the app