second fix attempt for issue #3659