Redo of issue 769