Closes #642