Fix metric insertion into rules