all sorts of fixes