Fix previous day calculation