Fixed bug of media API