a few general fixes