Several fixes.
Merging