Several fixes.