misc fixes for serious bugs seen in the beta release.  should be better