Closes #1015