More tweaks to media linking to improve performance