removeMetrics fix and tests added for adding removing metrics