Fixed a typo, added missing error and completion handling