Closes issue #1542