Dev/issue 5914

This fixes #5914