fix for when a training file is shorter than the window size