added isset checks