Closes #590.