Mac: Fixed bugs in Update Library process.

Related to issue #381.