added missing isset() in Api.php