Fix for null session