bug fix

ArrayAccess and array_key_exists don't work well together so changed to
isset