Strange NPE evade. Fixes #534, #387, #692