Fix NPE introduced in 340d6e0522b7cb03349e6f60ee169e8b7452fbcb