fix bug in Convert::toNumber