fixed the same potential bugs, still weird addDouble error