Closes #629