fix the error test and add tests up the coverage to 72.5% xwen2