Closes issue #1121