Fixing NPE corner case