Fixed check_media for python3