String constructor doesn't convert float type correctly