added missing error return value