Fixed add_cap function.