various misc fixes