Fix for new PHP version