Added tyype casting to be able to do proper aggregate functions via
MongoDB