corrected bug in number check method.