Fixed JSON to python conversion