Several small fixes.

Done.