[WIP] patch #5860 

[WIP] patch #5860