Bug fix for the capping feature