json dumps and loads are broken