fix bug when no validation set