Added isset to check for an index to remove undefined index notice.  #2692