quick fix for metric.py error

Quick fix for now. Will leave it upto sharad to figure out if this is the right way