Various fixes
Various fixes.