fixed local variables in the onlyNumbers function.