bugfix for training with full rank