Fixing bad library replacement