Closes #636