Why does the app stop working after being connected to the camera?