fix float overflow