Closes #516.