Fix bug in sync_with_*_media commands