fixed parsejson not using the right variable