Closes #511.