Closes issue #1504