Closes issue #1580