Fixed bug of media management