Fix minion filter and sort to work with no grains