Fix issues in provider

There was an issue in the `annotate` method and in `invoke`.

PS: better use two spaces for indentation.