Right ending condition, minus debug.