ensure media library button is displayed or hidden correctly