fix provider creation