Closes #658