Closes issue #1397