Fix bug when training from SV.