Move updatedLimitCount to outer loop of member