use type instead of item->type. can you please update this pull request @mathieudugal.