Merge "Catch IllegalStateException in StatsManager"