fix regression from bug #30990. Thanks to Olaf