Libs/Various: Fixed reduce function for all data structures