Several smaller fixes.