add conditional to pause
fixes for media player pausing.