dumps returns str (python3 fix)