its late... removing undefined index isset from json check so it will actually work