fix bugs of getting contacts

fix bugs of getting contacts, now it can get all contacts