Fixed NPE when session key no longer exists