added isset to remove errors