Prevent race NPE seen on some systems.