Fixed some media id-related bugs, media ranking