fixed nasty bug in json_prolog