getNumber function fixed.