Fixed error when metrics is disabled