moved config check to right place.  I wish I were smarter.