Fixing NRE due to login race