fix bug relative to double type