Adapt latest CSLib changes