Fixing centering matrix bug - found by coverity CID 25867

@sonney2k - please do a quick check, because this method isn't test-covered.