Metric NPE bugfix