Fix library handling.