Changed correlation formation so that the top level of data (depth = 1) is
not left as 0!