fixed a bug when double is not supported.