fix: fix null pointer when session is deleted