Closes #5882