debugging error when creating provider