Closes issue #1566