Some more general fixes