Fixed problems with changing schema on remote and distributed cfg
Fixed issues with sharing. Added also first test case on sharding