Do not call total metrics if target is not valid - fix #140