Fix an issue where the wrong index was removed from playlist