some general fixes