Fix for NRE after logging out