Small fixes
merged out from ken and fixed conflicts