If I buy a stock on ex-date, am I eligible for dividends? How does it work?