Fix bug causing crash if 23s only, clean code