Corrected error in new provider creation. Fixes #386, Closes #386