fixed cosseg and cossegr for sample-accuarate, and cossegr in general