Fixed using the already initialized provider instead of creating a new one.