Closes issue #1521