added double-precision fix.