sort plugins by package
fix bug with api.has