Added test for Float64 and fixed bug