Fix Capsule lib bug