fix the change of media context in ajax modal