some misc fixes.