Fixed issues in the way sharing/receiving flag was getting set for contacts

Reverted bad changes