Fixed max function to sort numerical values only.
Merge branch '1.0.2' into develop