fixed bug affecting json and python formatter