Serveral small fixes.