Fix contract creation and subscriber lock handling

Properly create contact on-the-go.
Set lock preferences of subscribers only if >0.