various changes and fixes
various changes and fixes