Several small fixes.