change media, and fix bugs