Fix ClassCastException if the values are stored as String instead of
numeric values
Reformat code
Merge branch 'PerfectCarl_develop' into develop