fix bug for invalid number