FYI: I included by mistake the changes of issue1694 into this branch. So this branch covers issue 1693 and 1694.