Closes #670.