fix some misc errors