some misc fixes