This happend because the go routine did not capture the media variable, and so the it would change before the go routine could start and call the DetectFaces function.