Fixed metric creation during metric configuration creation.

Unit tests pending

Signed off by: Heitor Reis <marcheing@gmail.com>