Closes issue #1638