Cleanup for #1955. Closes #2016