fix db index on media