FIxed #81616 and improved #81440