Fixed nullpointexception in adv exist method