Fix library size calculation