fixed rendering bug when some metrics are not included; updated unit test
updated version