set of fixes

set of important and minor fixes.
no new features.