Minor fix for number toggling function