Modified the way records are fetched, to ensure there are enough closed posts to train model.