fixing the app code