fixed issue with cascade trainer running out of samples