minor bugfix for whitening