Made library install rule more robust.
Generic fixes.