Fixed autoprovider bug