sort multiples gateways by `refs`
Merge pull request #4 from layerssss/patch-1

sort multiples gateways by `refs`