changed `p_global` to `p_isglobal` to be consistent with `p_isloaded`  #45