(issue #3904) update helper function