Change how end conditions are handled