Bug fix in cor()  (Issue #232)