Some important fixes PHP 8.1