fix session static function