fixed crash, still have a bug to work out in GPJSON