Fixed an error on asArray as the returned values did not have the natural order