Fix library deleting