Some fixes  and recode for lib and progressive test