hacked fix into isid() helper function. see code comment