Fix json deserialisation from postgresql
Prepare for v0.5.2