Fixed adding/removing contacts in gateway mode