Fixed two bugs with cloning and media.js