fixed a bug on number detection