Fix bug that occurred when trying to update the info panel.

When the mode changed, and the user wasn't on the main screen the app crashed. Because it tried to replace the info panel, which caused an exception.

Fixed by correctly adding mode changes callbacks on the activity lifecycle.