(issue #3904) cleaner implementation