fix err_amount 2nd try