Small general fixes