All sorts of fixes