Moved globalUsage array initialization before query