Issue/1772 for stable6

Fix #1772 

@karlitschek @schiesbn @blizzz