fix json quotes and other errors