fix onPause, onResume crashes for recognition services
fix onresume for visualizer