maybe fix problem with null pointer when no session