Fix issue caused by precision of double type