Update metric and bugs fixed