Fixed bugs when detecting the current media status.