It sounds like you are pretty much there.
First thing I would always check is that the correct value you are expecting is being stored in the media table. If its not storing correctly then there is an issue with the way the insert page is working.
Then, what is your results page? Is it just displaying the record information or is it an 'edit' page.
If the wrong value is being retrieved is there any pattern to it (i.e. is it the same incorrect value or is it random?)