Closes issue #1589