fixed bug with contact_list API method (and possibly other ones)