fixes #1722, fixes #1720