Closes issue #1661