Fixed queue to use object properties instead of array keys.