Proposed solution for issue #2312