Minor: improved exception when JSON is not valid
Distributed: fixed bug on db aligning after deploy database