Generator: fixed undefined variable when there is no provider [fixes #7]