On finite cocycles and the sphere theorem