Added numeric sort for attributes. Closes #5978